use rstest::rstest;

use super::super::*;

#[rstest]
fn test_missing_tile_policy_raw_initialization(
    #[values(MissingTilePolicy::Avoid, MissingTilePolicy::Exit)]
    missing_tile_policy: MissingTilePolicy,
) {
    match missing_tile_policy {
        // The following match will fail if any variant is missing or any one is not a unit variant.
        MissingTilePolicy::Avoid | MissingTilePolicy::Exit => (),
    }
}

#[rstest]
#[case::avoid(MissingTilePolicy::Avoid, "avoid".to_string())]
#[case::exit(MissingTilePolicy::Exit, "exit".to_string())]
fn test_missing_tile_policy_fmt(
    #[case] missing_tile_policy: MissingTilePolicy,
    #[case] expected_output: String,
) {
    assert_eq!(missing_tile_policy.to_string(), expected_output);
}
